import Vue from 'vue'

import App from './App.vue'
// import List from './pages/list'

import router from './router'
import { Modal, Form, Input, Button, Checkbox } from 'ant-design-vue';
import { get } from './utils/request';

import 'ant-design-vue/dist/antd.css'; 

Vue.use(Modal);
Vue.use(Form);
Vue.use(Input);
Vue.use(Button);
Vue.use(Checkbox);

Vue.config.productionTip = false;

window.addEventListener('load',()=>{
  if(!localStorage.getItem('public_key')){
    get('/getPublicKey')
    .then(data=> {
      localStorage.setItem('public_key', data);
    })
  }
})

new Vue({
  router,
  render: createElement => createElement(App)
}).$mount('#app')
